home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10482 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.0 KB  |  36 lines

  1. Path: utpapa.ph.utexas.edu!tian
  2. From: tian@utpapa.ph.utexas.edu (Shiyang Tian)
  3. Newsgroups: comp.lang.c++
  4. Subject: [help] can't open the file
  5. Date: 8 Mar 1996 02:51:05 GMT
  6. Organization: Physics Department, University of Texas at Austin
  7. Message-ID: <4ho7ap$ddd@geraldo.cc.utexas.edu>
  8. NNTP-Posting-Host: utpapa.ph.utexas.edu
  9.  
  10. Hi,
  11.  
  12. I am using gcc version 2.6.3. I got a problem when I ran a C++ program. The 
  13. following error message was dumped by gdb (v4.14):
  14.     
  15. Program received signal SIGSEGV, Segmentation fault.
  16. 0x1002e714 in fstreambase::open (this=0x200549b8, 
  17.     name=0x2ff7f8f4 "status.out", mode=2, prot=436) at ./streambuf.h:207
  18. ./streambuf.h:207: No such file or directory.
  19.  
  20. I have defined output stream somewhere in a master file main.C
  21. #include <fstream.h>
  22. ofstream status;
  23.  
  24. and open the file in another file another.C
  25. #include <fstream.h>
  26. extern status;
  27. status.open("status.out", ios::out);
  28.  
  29. What's the possible reasons for this error? I can't reproduce this error
  30. with a small program.
  31.  
  32. Thank you very much for your help.
  33.  
  34.  
  35.  -- Tian
  36.